// 账户管理相关接口
import request from '@/utils/request'
import { withPrefix, Method } from '@/service'

// 获取账户列表
export const accountList = (data) => {
  return request({
    url: withPrefix('/api/international/company/v1/list'),
    method: Method.POST,
    data
  })
}

// 获取账户详情
export const accountDetail = (data) => {
  return request({
    url: withPrefix('/api/international/company/v1/view'),
    method: Method.POST,
    data
  })
}

// 银行卡号信息
export const bankList = data => {
  return request({
    url: withPrefix('/api/international/companyBank/v1/list'),
    method: Method.POST,
    data
  })
}

// 获取账户详情返点账户信息
export const rebateAccountData = data => {
  return request({
    url: withPrefix('/api/finance/companyRebate/v1/info'),
    method: Method.POST,
    data
  })
}

// 获取账户详情授信信息
export const getCreditInfo = data => {
  return request({
    url: withPrefix('/api/finance/credit/v1/getCreditInfo'),
    method: Method.POST,
    data
  })
}

// 获取账户详情中返点明细
export const companyBackFlow = data => {
  return request({
    url: withPrefix('/api/finance/companyRebateTransactionFlow/v1/queryPage'),
    method: Method.POST,
    data
  })
}

// 获取账户详情中授信明细
export const creditBackFlow = data => {
  return request({
    url: withPrefix('/api/finance/companyCreditTransactionFlow/v1/queryPage'),
    method: Method.POST,
    data
  })
}

// 获取账户详情列表流水核销记录列表中核销记录
export const writeOffRecordById = data => {
  return request({
    url: withPrefix('/api/finance/writeOffRecord/v1/queryList'),
    method: Method.POST,
    data
  })
}
